<?php
namespace app\index\controller;
use app\util\PdoHelper;
use think\Controller;

class Common extends Controller
{
    protected $pdo;
    function __construct()
    {
        parent::__construct();
        $this->pdo = new PdoHelper();
        $this->LoadWebConfig();
    }
    private function LoadWebConfig()
    {
        $stmt = $this->pdo->getStmt("select * from smalls_config");
        while ($row = $stmt->fetch()){
            config("web_{$row['vkey']}",$row['value']);
        }
    }
}